﻿<%@ Page Language="C#" Theme="WebMaster" MasterPageFile="~/WebMaster/MasterPage.master" AutoEventWireup="true" CodeFile="Category.aspx.cs" Inherits="webapp4U.UI.WebMaster_Default" %>
<%@ Register Src="~/WebMaster/Controls/Title.ascx" TagName="Title" TagPrefix="uc" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register TagPrefix="webapp4U" Namespace="webapp4U.UI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server">

<uc:Title runat="server" ResourceKey='Product_Category' />
<br />

<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
    <tr>
        <td valign="top">
              <div>
                    <table border="0" width="100%" align="center">
                      <tr>
                            <td align="center">
                                <asp:Label runat="server" ID="lblMsg" ForeColor="red"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td style="padding-top:5pt">
                                <table border="0" cellpadding="6" align="center">
                                        <tr>
                                            <td align="right"><b><%=ResourceManager.GetString("Parent")%>: </b></td>
                                            <td>
                                                <webapp4U:ddlCategory runat="server" ID="dlCategoryAddEdit" Width="255" EnableViewState="true" CssClass="Textbox" />
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="dlCategoryAddEdit"
                                                    Display="Dynamic" ErrorMessage="<br>Select Parent Category" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right"><b><%=ResourceManager.GetString("Category") %> (vn): </b></td>
                                            <td>
                                                <asp:TextBox ID="txtCateName" runat="server" Width="250" MaxLength="700"></asp:TextBox>
                                                <asp:RequiredFieldValidator runat="server" ID="rfvCateName" ControlToValidate="txtCateName" ErrorMessage="*" Display="Dynamic"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td align="right"><b><%=ResourceManager.GetString("Category") %> (en): </b></td>
                                            <td>
                                                <asp:TextBox ID="txtCateName_en"  runat="server" Width="250" MaxLength="700"></asp:TextBox>
                                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="txtCateName_en" ErrorMessage="*" Display="Dynamic"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        
                                        <tr class="Hidden">
                                            <td valign="top"><b><%=ResourceManager.GetString("Description") %>: </b></td>
                                            <td>
                                                <asp:TextBox ID="txtCateDesc" runat="server" Width="250" TextMode="MultiLine" Rows="3" MaxLength="700"></asp:TextBox>
                                                
                                            </td>
                                        </tr>
                                        <tr class="Hidden">
                                            <td valign="top"><b>Image: </b></td>
                                            <td>
                                                <asp:FileUpload ID="PhotoFile" Runat="server" Width="250" CssClass="Textbox" />
                                                <asp:HiddenField runat="server" ID="HPhotoFile" />
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td align="right"><b><%=ResourceManager.GetString("Order") %>:</b></td>
                                            <td>
                                                <asp:TextBox ID="txtCateOrder" Font-Bold="true" runat="server" Width="250" MaxLength="700" Text="0"></asp:TextBox>
                                                <asp:RangeValidator runat="server"  ControlToValidate="txtCateOrder" ID="rvl1" Type="Integer" MinimumValue="0" MaximumValue="1000" Display="dynamic" ErrorMessage="<br>Giá trị sắp xếp phải là kiểu số nguyên >=0 và <=1000" CssClass="error"></asp:RangeValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" colspan="2" valign="middle">
                                                <webapp4U:LinkButton2 runat="server" ID="btDelete" OnClick="btDelete_Click" ResourceName="Delete" CausesValidation="false" />
                                                <webapp4U:LinkButton2 runat="server" ID="btSave" OnClick="btSave_Click" ResourceName="AddNew" />
                                            </td>
                                        </tr>
                                   </table>
                            </td>
                        </tr>
                    </table>     
                </div>
                
                <div>
                <table width="100%" border="0" cellpadding="5">
                    <tr>
                        <td style="padding-left:20pt;">
                              <asp:treeview id="TreeCategory" runat="server" showlines="True" enableviewstate="True">
                                <Nodes>
                                    <asp:TreeNode Text="All Items" SelectAction="Expand" Value="All Items" />
                                </Nodes>
                                <selectednodestyle font-underline="True" forecolor="#5555DD"></selectednodestyle>
                                <ParentNodeStyle ForeColor="red" />
                                <RootNodeStyle Font-Bold="true" ForeColor="red" />
                                <nodestyle font-names="Tahoma" font-size="10pt" forecolor="Black"></nodestyle>
                                <hovernodestyle font-underline="True" forecolor="#5555DD"></hovernodestyle>
                            </asp:treeview>
                        </td>
                    </tr>
                     <tr>
                        <td  style="padding-left:20pt; line-height:12pt">
                            <%--Click vào danh mục đã có nếu muốn chỉnh sửa hay xóa bỏ danh mục đó.--%>
                        </td>
                    </tr>
                </table>
                </div>
        </td>
   </tr>
</tbody>
</table>


</asp:Content>

